{php} $config = model('Config')->lists();
    config($config); //添加配置
    $count_code=config('COUNT_CODE');
{/php}
<script type="text/javascript">
    var ThinkPHP = window.Think = {
        "DOMAIN": "{:request()->root(true)}", //当前网站域名
        "ROOT": "__ROOT__", //当前网站地址
        "APP": "__APP__", //当前项目地址
        "PUBLIC": "__PUBLIC__", //项目公共目录地址
        "DEEP": "{:config('URL_PATHINFO_DEPR')}", //PATHINFO分割符
        "MODEL": ["{:config('URL_MODEL')}", "{:config('URL_CASE_INSENSITIVE')}", "{:config('URL_HTML_SUFFIX')}"],
        "VAR": ["{:config('VAR_MODULE')}", "{:config('VAR_CONTROLLER')}", "{:config('VAR_ACTION')}"],
        'URL_MODEL': "{:config('URL_MODEL')}",
        'WEIBO_ID': "{:config('SHARE_WEIBO_ID')}"
    }
    var cookie_config={
        "prefix":"{:config('COOKIE_PREFIX')}",// cookie 名称前缀
        "path" :"{:config('COOKIE_PATH')}", // cookie 保存路径
        "domain":"{:config('COOKIE_DOMAIN')}" // cookie 有效域名
    }
    var Config={
        'GET_INFORMATION':{:modC('GET_INFORMATION',1,'Config')},
        'GET_INFORMATION_INTERNAL':{:modC('GET_INFORMATION_INTERNAL',10,'Config')}*1000,
        'WEBSOCKET_ADDRESS':"{:modC('WEBSOCKET_ADDRESS',gethostbyname($_SERVER['SERVER_NAME']),'Config')}",
        'WEBSOCKET_PORT':{:modC('WEBSOCKET_PORT',8000,'Config')}
    }
    var weibo_comment_order = "{:modC('COMMENT_ORDER',0,'WEIBO')}";
</script>
